#region Using Statements
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
#endregion

namespace KLib
{
    /// <summary>
    /// Queries the Game.Services Collection and attempts to load a service of the requested type.
    /// If a service is not found, an Exeption is thrown. Use when the service is Required.
    /// </summary>
    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Interface, AllowMultiple=false)]
    public class RequiredServiceAttribute : System.Attribute
    {
        #region Fields
        public Type serviceType;
        #endregion

        #region Properties
        public Type ServiceType
        {
            get { return serviceType; }
            set { serviceType = value; }
        }
        #endregion

        #region Initialization

        public RequiredServiceAttribute()
        {
            serviceType = null;
        }

        public RequiredServiceAttribute(Type serviceType)
        {
            this.serviceType = serviceType;
        }

        #endregion
    }
}
